package com.ruoyi.tongban.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.tongban.domain.InsClassCamera;
import com.ruoyi.tongban.mapper.InsClassCameraMapper;
import com.ruoyi.tongban.service.IInsClassCameraService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 班级-监控视频关系Service业务层处理
 * 
 * @author caiyanshan
 * @date 2021-03-09
 */
@Service
public class InsClassCameraServiceImpl implements IInsClassCameraService 
{
    @Autowired
    private InsClassCameraMapper insClassCameraMapper;

    /**
     * 查询班级-监控视频关系
     * 
     * @param classCameraId 班级-监控视频关系ID
     * @return 班级-监控视频关系
     */
    @Override
    public InsClassCamera selectInsClassCameraById(Long classCameraId)
    {
        return insClassCameraMapper.selectInsClassCameraById(classCameraId);
    }

    /**
     * 查询班级-监控视频关系列表
     * 
     * @param insClassCamera 班级-监控视频关系
     * @return 班级-监控视频关系
     */
    @Override
    public List<InsClassCamera> selectInsClassCameraList(InsClassCamera insClassCamera)
    {
        return insClassCameraMapper.selectInsClassCameraList(insClassCamera);
    }

    /**
     * 新增班级-监控视频关系
     * 
     * @param insClassCamera 班级-监控视频关系
     * @return 结果
     */
    @Override
    public int insertInsClassCamera(InsClassCamera insClassCamera)
    {
        insClassCamera.setCreateTime(DateUtils.getNowDate());
        return insClassCameraMapper.insertInsClassCamera(insClassCamera);
    }

    /**
     * 修改班级-监控视频关系
     * 
     * @param insClassCamera 班级-监控视频关系
     * @return 结果
     */
    @Override
    public int updateInsClassCamera(InsClassCamera insClassCamera)
    {
        insClassCamera.setUpdateTime(DateUtils.getNowDate());
        return insClassCameraMapper.updateInsClassCamera(insClassCamera);
    }

    /**
     * 批量删除班级-监控视频关系
     * 
     * @param classCameraIds 需要删除的班级-监控视频关系ID
     * @return 结果
     */
    @Override
    public int deleteInsClassCameraByIds(Long[] classCameraIds)
    {
        return insClassCameraMapper.deleteInsClassCameraByIds(classCameraIds);
    }

    /**
     * 删除班级-监控视频关系信息
     * 
     * @param classCameraId 班级-监控视频关系ID
     * @return 结果
     */
    @Override
    public int deleteInsClassCameraById(Long classCameraId)
    {
        return insClassCameraMapper.deleteInsClassCameraById(classCameraId);
    }
}
